<template>
	<view class="shopping-details-address">
		<u-popup :show="show" mode="bottom" :overlay="true" round="30rpx" @open="open">
			<view class="box">
				<view class="" style="height: 32rpx;"></view>
				<view class="header">
					<view class="title">参数</view>
					<view class="icon-close" @click="close">
						<u-icon name="close" size="12" color="#BDBDBD"></u-icon>
					</view>
				</view>
				<view class="" style="height: 40rpx;"></view>
				<view class="list">
					<view class="list-item" v-for="(item,index) in listData" :key="index">
						<view class="label">{{item.goodsParameterName}}</view>
						<view class="value">{{item.parameter}}</view>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		props:{
			listData:{
				type:Array,
				default:()=> []
			}
		},
		data() {
			return {
				show: false,
				val: false
			}
		},
		methods: {
			init() {
				this.show = true;
			},
			open() {
				// console.log('open');
			},
			close() {
				this.show = false
				// console.log('close');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.shopping-details-address {
		.box {
			.list {
				padding-left: 32rpx;
				padding-top: 32rpx;
				padding-bottom: calc(env(safe-area-inset-bottom) + 134rpx);
				.list-item {
					&+ .list-item{						
						margin-top: 40rpx;
					}
					display: flex;
					align-items: center;
					
					.label{
						font-size: 24rpx;
						font-weight: 400;
						color: #878787;
						width: 400rpx;
					}
					.value{
						font-size: 24rpx;
						font-weight: 400;
						color: #1F1F1F;
					}
				}
			}


			.header {
				position: relative;
				.title {
					width: 100%;
					text-align: center;
					font-size: 30rpx;
					font-weight: 500;
					color: #1F1F1F;
				}

				.icon-close {
					position: absolute;
					right: 32rpx;
					top: 50%;
					transform: translate(0, -50%);
					background-color: #F1F1F1;
					height: 38rpx;
					width: 38rpx;
					border-radius: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
				}
			}
		}
	}
</style>
